using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

namespace SinceTimes.NetWork
{
    public class UINetState : MonoBehaviour
    {
        public Text UIMessageIn,UIMessageOut;
        public Text UIPeerState;
        // Start is called before the first frame update


        
        // Update is called once per frame
        void LateUpdate()
        {
            if (Net.INSTANCE == null || Net.INSTANCE.Report==null) return;

            if(UIPeerState != null )
            {
                UIPeerState.text = Net.INSTANCE.Report.ToString();

            }

            if (UIMessageIn != null && Net.INSTANCE.Report.DataReceive != null)
                UIMessageIn.text = Net.INSTANCE.Report.DataReceive.ToString();
            if (UIMessageOut != null && Net.INSTANCE.Report.DataSend != null)
                UIMessageOut.text = Net.INSTANCE.Report.DataSend.ToString();
        }
    }
}

